Method for multi-tasking multiple java virtual machines in a secure environment

ABSTRACT

The present invention allows construction of a secure, real-time operating system from a portable language such as Java that appears to be a Java virtual machine from a top perspective but provides a secure operating system from a bottom perspective. This allows portable languages, such as Java, to be used for secure embedded multiprocessor environments.

This application is a continuation of U.S. patent application Ser. No.10/132,886, filed Apr. 24, 2002 entitled: METHOD FOR MULTI-TASKINGMULTIPLE JAVA VIRTUAL MACHINES IN A SECURE ENVIRONMENT.

This application incorporates by reference U.S. patent application Ser.No. 09/841,753, filed Apr. 24, 2001 entitled: OPEN COMMUNICATION SYSTEMFOR REAL-TIME MULTIPROCESSOR APPLICATIONS and U.S. patent applicationSer. No. 09/841,915, filed Apr. 24, 2001 entitled: METHOD AND APPARATUSFOR DYNAMIC CONFIGURATION OF MULTIPROCESSOR SYSTEM.

BACKGROUND OF THE INVENTION

Java is a robust, object-oriented programming language expresslydesigned for use in the distributed environment of the Internet. Javacan be used to create complete applications that may run on a singlecomputer or be distributed among servers and clients in a network. Asource program in Java is compiled into byte code, which can be runanywhere in a network on a server or client that has a Java virtualmachine (JVM).

A JVM describes software that is nothing more than an interface betweenthe compiled byte code and the microprocessor or hardware platform thatactually performs the program's instructions. Thus, the JVM makes itpossible for Java application programs to be built that can run on anyplatform without having to be rewritten or recompiled by the programmerfor each separate platform.

Jini is a distributed system based on the idea of federating groups ofusers and the resources required by those users. Resources can beimplemented either as hardware devices, software programs, or acombination of the two. The Jini system extends the Java applicationenvironment from a single virtual machine to a network of machines. TheJava application environment provides a good computing platform fordistributed computing because both code and data can move from machineto machine. The Jini infrastructure provides mechanisms for devices,services, and users to join and detach from a network. Jini systems aremore dynamic than is currently possible in networked groups whereconfiguring a network is a centralized function done by hand.

However, the Java/Jini approach is not without its disadvantages. BothJava and Jini are free, open source applications. The Java applicationenvironment is not designed for controlling messaging between differentmachines. For example, the Java application is not concerned about theprotocols between different hardware platforms. Jini has some built-insecurity that allows code to be downloaded and run from differentmachines in confidence. However, this limited security is insufficientfor environments where it is necessary to further restrict code sharingor operation sharing among selected devices in a secure embedded system.

SUMMARY OF THE INVENTION

The present invention allows construction of a secure, real-timeoperating system from a portable language such as Java that appears tobe a Java virtual machine from a top perspective but provides a secureoperating system from a bottom perspective. This allows portablelanguages, such as Java, to be used for secure embedded multiprocessorenvironments.

The foregoing and other objects, features and advantages of theinvention will become more readily apparent from the following detaileddescription of a preferred embodiment of the invention which proceedswith reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing a java stack with an additional SecureReal-time Executive (SRE) layer.

FIG. 2 is a diagram of a multiprocessor system that runs multiple JavaVirtual Machines that each include a SRE.

FIG. 3 is a detailed diagram of the managers in the SRE.

FIG. 4 is a block diagram of how the SRE manages a multiprocessorsystem.

FIG. 5 is a bock diagram showing how a task manager in the SRE operatesthe multiprocessor system in a lock-step mode.

DETAILED DESCRIPTION

A java application stack includes a Java layer 5 for running any one ofmultiple different applications. In one example, the applications arerelated to different vehicle operations such as Infrared (IR) and radarsensor control and monitoring, vehicle brake control, vehicle audio andvideo control, environmental control, driver assistance control, etc. AJava Virtual Machine (JVM) layer 16 provides the hardware independentplatform for running the Java applications 5. A Jini layer 12 providessome limited security for the Java applications that run on differentmachines. However, the Jini layer 12 does not provide the necessaryreconfiguration and security management necessary for a distributedreal-time multiprocessor system.

A Secure Real-time Executive (SRE) 14 provides an extension to the JVM16 and allows Java to run on different processors for real-timeapplications. The SRE 20 manages messaging, security, critical data,file I/O multiprocessor task control and watchdog tasks in the Javaenvironment as described below. The JVM 16, Jini 12 and SRE 14 can allbe implemented in the same JVM 10. However, for explanation purposes,the JVM 10 and the SRE 14 will be shown as separate elements.

FIG. 2 shows a system 15 that includes multiple processors 16, 18, 20,22 and 24. Each processor includes one or more JVMs 10 that rundifferent Java applications. For example, processor 16 includes one Javaapplication 28 that controls a vehicle security system and another Javaapplication 26 that controls the vehicles antilock brakes. A processor18 includes a Java application 30 that controls audio sources in thevehicle. Other processors 20 and 22 may run different threads 32A and32B for the same sensor fusion Java application 32 that monitorsdifferent IR sensors. Another thread 32C on processor 24 monitors aradar sensor for the sensor fusion Java application 32.

The SRE 14 runs below the JVMs 10 in each processor and control tasks,messaging, security, etc. For example, the Java application 26 controlsvehicle braking according to the sensor data collected by the sensorfusion Java application 32. The SRE 14 in one example preventsunauthorized data from being loaded into the processor 16 that runsbrake control application 26. The SRE 14 also prevents other Javaapplications that are allowed to be loaded into processor 16 fromdisrupting critical braking operations, or taking priority over thebraking operations, performed by Java application 26.

For example, the SRE 14 may prevent noncritical vehicle applications,such as audio control, from being loaded onto processor 16. In anotherexample, noncritical operations, such as security control application28, are allowed to be loaded onto processor 16. However, the SRE 14assigns the security messages low priority values that will only beprocessed when there are no braking tasks in application 26 that requireprocessing by processor 16.

The SRE 14 allows any variety of real-time, mission critical,nonreal-time and nonmission critical Java applications to be loaded ontothe multiprocessor system 15. The SRE 14 then automatically manages thedifferent types of applications and messages to ensure that the criticalvehicle applications are not corrupted and processed with the necessarypriority. The SRE 14 is secure software that cannot be manipulated byother Java applications.

The SRE 14 provides priority preemption on a message scale across theentire system 15 and priority preemption on a task scale across theentire system 15. So the SRE 14 controls how the JVMs 10 talk to eachother and controls how the JVMs 10 are started or initiated to performtasks. The SRE 14 allows programmers to write applications using Java ina safe and secure real time environment. Thus, viruses can be preventedby SRE 14 from infiltrating the system 15.

While the explanation uses Java as one example of a programmingenvironment where SRE 14 can be implemented, it should be understoodthat the SRE 14 can be integrated into any variety of differentprogramming environments that may run in the same or different systems15. For example, SRE 14 can be integrated into an ApplicationProgrammers Interface (API) for use with any programming language suchas C++.

FIG. 3 shows the different functions that are performed by the SRE 20.Any combination of the functions described below can be provided in theSRE 20. A message manager 50 controls the order messages are receivedand transmitted by the different Java applications. A security manager52 controls what data and messages are allowed to be received ortransmitted by different Java applications. A critical data manager 54controls what data is archived by the different Java applications.

A data manager 56 controls what data is allowed to be transferredbetween different processors. A task manager 58 controls the order tasksare performed by the different JVMs. A reconfiguration manager 60monitors the operation of the different processors in the system andreassigns or reconfigures Java applications and Java threads todifferent processors according to what processors have failed or whatnew processors and applications have been configured into system 15.

The message manager 50 partially corresponds to the priority manager 44shown in FIG. 2 of pending patent application Ser. No. 09/841,753, thecritical data manager 52 partially corresponds with the logging manager44 shown in FIG. 2 of the copending '753 patent application, and thesecurity manger 54 a least partially corresponds with the securitymanager 40 shown in the '753 patent application. The data manager 56 atleast partially corresponds with the data manager 42 shown in FIG. 2 ofpending patent application Ser. No. 09/841,915, the task manager 58partially corresponds to the device manger 46 shown in FIG. 2 of the'915 application, and the configuration manager 60 at least partiallycorresponds to the configuration manager 44 shown in FIG. 2 of the '915patent application. The descriptions of how the different managers 50-60operate similarly to the corresponding managers in the '753 and '915patent applications are herein incorporated by reference and aretherefore not described in further detail.

However, some specific tasks performed by the managers 50-60 aredescribed below in further detail.

FIG. 4 shows in more detail how the SRE 14 operates. One of theoperations performed by the task manager 58 is to control when differenttasks are initiated on different processors. For example, a first GlobalPositioning System (GPS) thread 62 is running on a JVM in a processor80. Another sensor fusion thread 64 is running on a different processor82. Block 74 represents the Java Virtual Machine operating in each ofprocessors 80 and 82. A master JVM 74 may run on either processor 80,processor 82 or on some other processor.

The task manager 58 sends an initiation command 66 to the GPS thread 62to obtain location data. The task manager 58 then directs the obtainedGPS data 68 through a link to the sensor fusion thread 64 for subsequentprocessing of GPS data 68. The link may be any bus, such as a PCI bus,serial link such as a Universal Serial Bus, a wireless link such as bluetooth or IEEE 802.11, or a network link such as Ethernet, etc.

The configuration manager 60 acts as a watchdog to make sure that theGPS thread 62 and the sensor fusion thread 64 are each runningcorrectly. In one example, separate configuration managers 60 in eachprocessor 80 and 82 sends out periodic signals to the otherconfiguration managers 60 in the other processors. Any one of theconfiguration managers 60 can detect a processor or application failureby not receiving the periodic “ok” signals from any one of the otherprocessors for some period of time. If a failure is detected, then aparticular master configuration manager 60 in one of the processorsdetermines where the task in the failed processor is going to bereloaded. If the master configuration manager 60 dies, then someconventional priority scheme, such as round robin, is used to selectanother configuration master.

If a failure is detected, say in the processor 82 that is currentlyperforming the sensor fusion thread 64, a message is sent from theconfiguration manager 60 notifying the task manager 58 which processoris reassigned the sensor fusion thread. In this example, another sensorfusion thread 76 in processor 84 is configured by the configurationmanager 60.

The critical data manager 52 manages the retention of any critical data72 that was previously generated by the sensor fusion thread 64. Forexample, the critical data manager 54 automatically stores certain dataand state information that was currently being used in the sensor fusionthread 64. The critical data may include GPS readings for the last 10minutes, sensor data obtained from sensors in other processors in thevehicle over the last 10 minutes. The critical data may also include anyprocessed data generated by the sensor fusion thread 64 that identifiesany critical vehicle conditions.

The critical data manager 52 also determines which data to archivegenerally for vehicle maintenance and accident reconstruction purposes.

The configuration manager 60 directs the critical data 72 to the newsensor fusion thread 76. The task manager 74 then redirects any new GPSdata obtained by the GPS thread 78 to the new sensor fusion thread 76and controls sensor fusion tasks from application 76. Thus, theconfiguration manager 60 and the task manager 58 dynamically control howdifferent Java threads are initialized, distributed and activated ondifferent processors.

The message manager 50 determines the priority of sent and receivedmessages. If the data transmitted and received by the sensor fusionthread 76 is higher priority than other data transmitted and received onthe processor 84, then the sensor fusion data will be given priorityover the other data. The task manager 58 controls the priority that thesensor fusion thread 76 is giving by processor 84. If the sensor fusionthread 76 has higher priority than, for example, an audio applicationthat is also being run by processor 84, then the sensor fusion thread 76will be performed before the audio application.

The SRE 14 can be implemented in any system that needs to be operated ina secure environment. For example, network servers or multiprocessorsoperating in a home environment. The multiprocessors in home appliances,such as washer and dryers, home computers, home security systems, homeheating systems, can be networked together and operate Javaapplications. The SRE 14 prevents these multiple processors and thesoftware that controls these processors from being corrupted byunauthorized software and also allows the applications on thesedifferent processors to operate as one integrated system.

The SRE 14 is a controlled trusted computing based that is notaccessible by non-authorized application programmers and anyone in thegeneral public. Therefore, the SRL 14 prevents hacking or unauthorizedcontrol and access to the processors in the vehicle.

Task Controlled Applications

Debugging is a problem with multiprocessor systems. The task manager 58allows the Java applications to be run in a lock-step mode to moreeffectively identify problems in the multiprocessor system 15.

FIG. 5 shows a path 90 taken by a vehicle 92. In one application, theposition of the vehicle 92 is sampled every second t₁, t₂, t₃, t₄, etc.The position of the vehicle 92 is sampled by a GPS receiver in vehicle92 that reads a longitudinal and latitudinal position from a GPSsatellite. The GPS receiver is controlled by the GPS thread 62 thatreceives the GPS data and then sends the GPS data to a sensor fusionthread 64 that may run on the same or a different processor in thevehicle 92. The sensor fusion thread 64 can perform any one of manydifferent tasks based on the GPS data. For example, the sensor fusionthread 64 may update a map that is currently being displayed to thedriver of vehicle 92 or generate a warning signal to the vehicle driver.

For each sample period t_(N), the task manager 58 sends a request 94 tothe GPS thread 62 to obtain GPS data. The task manager 58 uses a clock96 as a reference for identifying each one second sample period. Eachtime a second passes according to clock 96, the task manager 58 sendsout the request 94 that wakes up the GPS thread 62 to go read the GPSdata from the GPS satellite. Once the GPS data has been received, theGPS thread 62 passes the GPS data 96 to the sensor fusion thread 64. TheGPS thread 62 then goes back into an idle mode until it receives anotheractivation command from the task manager 58.

The task manager 58 can control when the GPS thread 62 is woken up.Instead of the GPS thread 62 being free running, the GPS thread 62 isoperating according to a perceived time controlled by the task manager58. The task manager 58 may send the activation request 94 to the GPSthread 62 once every second during normal sensor fusion operation. Whenthe system is in a debug mode, however, the task manager 58 may onlysend one activation command 94. This allows the other operationsperformed by the system 89 to be monitored and determine how the singlesampling of GPS data 96 propagates through system 89. The task manager58 may also delay or disable task initiation to other threads, so thatthe processing of the GPS data 96 can be isolated.

The task manager 58 can isolate any state in the overall system 89, suchas the state of system 89 after a first GPS reading by GPS thread 62 orthe state of system 89 after the thirty second GPS reading by GPS thread62 by controlling when and how often activation commands 94 are sent toGPS thread 62. In a similar manner, the task manager 58 can control whenother tasks are performed by the system 89, such as when the sensorfusion thread 64 is activated.

Thus, the task manager 58 controls when Java applications are activatedeffectively running the overall system 89 in a lock-step mode. The taskmanager 58 can control the initiation of multiple tasks at the sametime. This allows the task manager to control what parameters andoperations are performed and used by the different Java threads so thatdifferent states in the multiprocessor system 89 can be detected andmonitored more effectively.

One application for the task controlled applications is for accidentreconstruction. The critical data manager 52 (FIG. 3) may save differentvehicle parameters from a vehicle that has been in an accident. Forexample, sensor data, brake data, speed data, etc. The task manager 58can feed the saved data into the different Java applications in alock-step mode to determine how each Java thread processes the saveddata. This can then be used to identify any failures that may haveoccurred in the system 89.

The system described above can use dedicated processor systems, microcontrollers, programmable logic devices, or microprocessors that performsome or all of the communication operations. Some of the operationsdescribed above may be implemented in software and other operations maybe implemented in hardware.

For the sake of convenience, the operations are described as variousinterconnected functional blocks or distinct software modules. This isnot necessary, however, and there may be cases where these functionalblocks or modules are equivalently aggregated into a single logicdevice, program or operation with unclear boundaries. In any event, thefunctional blocks and software modules or described features can beimplemented by themselves, or in combination with other operations ineither hardware or software.

Having described and illustrated the principles of the invention in apreferred embodiment thereof, it should be apparent that the inventionmay be modified in arrangement and detail without departing from suchprinciples. Claim is made to all modifications and variation comingwithin the spirit and scope of the following claims.

1. An operating system, comprising: an operating language that providesas an open software access system for software development; and a securereal-time executive that manages message security for the operatinglanguage.
 2. An operating system according to claim 1 wherein theoperating language is Java.
 3. An operating system according to claim 1wherein the operating language and the real-time executive operate inmultiple processors at the same time.
 4. An operating system accordingto claim 1 wherein the operating language is used to control vehicleoperations in real-time.
 5. An operating system according to claim 2wherein the real-time executive manages different JAVA applications atthe same time.
 6. An operating system according to claim 5 wherein thereal-time executive assigns priority values to JAVA messages andprocesses the JAVA messages according to the assigned priority values.7. An operating system according to claim 6 wherein the real-timeexecutive assigns priority preemption to messages for controlling howthe operating language in different applications talk to each other. 8.An operating system according to claim 6 wherein the real-time executivedetermines how data is achieved by the JAVA operating language.